if (ev->evtype == XI_Enter &&
xev->detail != XINotifyInferior && xev->mode != XINotifyPassiveUngrab &&
- gdk_surface_get_surface_type (surface) == GDK_SURFACE_TOPLEVEL)
+ GDK_IS_TOPLEVEL (surface))
{
if (gdk_device_get_device_type (source_device) != GDK_DEVICE_TYPE_MASTER)
_gdk_device_xi2_reset_scroll_valuators (GDK_X11_DEVICE_XI2 (source_device));
GdkSurfaceState old_state, set, unset;
if (GDK_SURFACE_DESTROYED (surface) ||
- gdk_surface_get_surface_type (surface) != GDK_SURFACE_TOPLEVEL)
+ !GDK_IS_TOPLEVEL (surface))
return;
old_state = gdk_toplevel_get_state (GDK_TOPLEVEL (surface));